<?php

/**
 * Created by PhpStorm.
 * User: evan
 * Date: 16/8/21
 * Time: 上午5:01
 */
class Base extends MY_Public_Api_Controller
{
    /**
     * 发送短信
     */
    public function send_sms()
    {
        $mobile = trim($this->input->get_post('mobile'));
        $type   = (int)($this->input->get_post('type'));


        $this->load->service('common/service_common_send_sms');
        $data = $this->service_common_send_sms->send($mobile, $type);


        $this->json_output($data['data'], $data['status']);
    }


    /**
     * 回报极光推送反馈内容
     */
    public function init_push_feedback()
    {
        $reg_id    = trim($this->input->get_post('reg_id'));
        $imei      = trim($this->input->get_post('imei'));
        $mac_addr  = trim($this->input->get_post('mac_addr'));
        $device_id = trim($this->input->get_post('device_id'));
        $client    = trim($this->input->get_post('client'));
        $uid       = $this->uid;


        $this->load->service('common/service_common_push');
        $data = $this->service_common_push->feedback($reg_id, $imei, $mac_addr, $device_id, $client, $uid);


        $this->json_output($data['data'], $data['status']);

    }
}